import pytest

@pytest.fixture(params=[('redis', '6379'),('elasticsearch', '9200')],autouse=True)
def pa(request):
    print("\n-------------{}-------------------".format(request.param))
    return request.param

def test_api():
    print("这是测试用例")
    assert 1 == 1
    
    
if __name__ =="__main__":
    pytest.main(["-vs","c:/Users/origi/Documents/python/Pytest_自动化框架/fixture参数化.py"])